import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from google.appengine.dist import use_library 
use_library('django', '1.2')

from google.appengine.ext import webapp   
from google.appengine.ext.webapp.util import run_wsgi_app

from webapp.OrderList import OrderListPage
from webapp.Detail import DetailPage
from webapp.Delete import DeleteModule
from webapp.Download import DownloadModule
from webapp.FileBlob import FileBlob
from webapp.FileBlob import UploadHandler
from webapp.FileBlob import ServeHandler
from webapp.CsvFile import CreateCsv

#temptemplate_values
#-current_user 
#-url
#-url_linktext
#-orderdata

application = webapp.WSGIApplication([('/', OrderListPage),
                                      ('/create_new', OrderListPage),
                                      ('/create_new_detail', DetailPage),
                                      ('/get_attched_file', DownloadModule),
                                      ('/deleteOrder', DeleteModule),
                                      ('/fileblob', FileBlob),
                                      ('/upload', UploadHandler),
                                      ('/serve/([^/]+)?', ServeHandler),
                                      ('/CsvFile', CreateCsv),
                                      ],
                                     debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
